﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using TP5Like.DBModel;
using System.Reflection;
using TP5Like.InterFace;
using System.Collections;

namespace TP5Like.DBModelValidate
{
    //此处填写地址的字段验证规则，并且验证规则，返回true或false，告知前端验证是否正确
    public class AddressValidate:Address
    {
        ValidateRule validateMessage = new ValidateRule();
        public AddressValidate()
        {
            CityValidate();
        }

        public List<ValidateRule> validateMessageList = new List<ValidateRule>();
        public void CityValidate()
        {
            validateMessage.value = "City";
            validateMessage.Require = true;
            validateMessage.StringLenth = 4;
            validateMessageList.Add(validateMessage);
        }


        //public bool IsROk = false;

        //public bool IsOk(ValidateRule validateRule, object value)
        //{
        //    return IsROk;
        //}

        //public bool IsValid()
        //{


        //    return false;
        //}
    }
     
}
